package ${package}pojo;

import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import java.sql.Timestamp;

<#--import annotation.Table;-->
<#--import annotation.TableColumn;-->

/**
* @desc：表名为： ${table_name}  表注释为： <#if table_remark !=""> ${table_remark} </#if>
* @author Auto generate
* @date ${gen_time}
*/
<#--@Table(tableName = "${table_name_small}"<#if table_remark !="">,expFileName="${table_remark}"<#else>,expFileName="导出数据文件"</#if> <#if table_order_by?exists>,orderBy="${table_order_by}"</#if><#if table_order?exists>,order="${table_order}"</#if>)-->
public class ${pojo_name} implements Serializable{

<#if COLUMNS?exists>
    <#list COLUMNS as model>
        /**
        * ${model.columnName}  ${model.columnType}
        * <#if model.remarks !="">${model.remarks}<#else>${model.javaName}</#if>
        */
    <#--    <#if model.javaType=="Date">@JSONField(format="yyyy-MM-dd")-->
    <#--    <#elseif model.javaType=="Timestamp">@JSONField(format="yyyy-MM-dd hh:mm:ss")</#if>-->
    <#--    @TableColumn(dbColumn = "${model.columnName}",dbColumnType = "${model.columnType}"<#if model.remarks != "">,excelHeader = "${model.remarks}"</#if><#if model.isPK == "true">,isPK="true"</#if>)-->
        @ApiModelProperty("<#if model.remarks !="">${model.remarks ?trim ?replace("\n","")?replace("","")}<#else>${model.javaName}</#if>")
        private ${model.javaType} ${model.javaName};

    </#list>
</#if>

private static final long serialVersionUID = 1L;

<#if COLUMNS?exists>
    <#list COLUMNS as model>
        public ${model.javaType} ${model.getterName}() {
        return ${model.javaName};
        }

        public void ${model.setterName}(${model.javaType} ${model.javaName}) {
        <#if model.javaType == "String">
            this.${model.javaName} = ${model.javaName} == null ? null : ${model.javaName}.trim();
        <#else>
            this.${model.javaName} = ${model.javaName};
        </#if>
        }
    </#list>
</#if>

public String toString(){
StringBuilder sb = new StringBuilder();
sb.append("pojo.${pojo_name} ").append("[");
<#if COLUMNS?exists>
    <#list COLUMNS as model>
        sb.append(", ${model.javaName} = ").append(${model.javaName});
    </#list>
</#if>
sb.append("]");
return sb.toString();
}

}